import request from '@/util/request.js'


export const addVideo = (data) => {

    return request.post('/video', data)
}
export const getAllVideo = () => {

    return request.get('/video')
}

export const getVideoById = (id) => {
    return request.get(`/video/${id}`)
}

export const queryLike = (videoId) => {
    return request.get(`/video/like/${videoId}`)
}

export const addLike = (data) => {
    return request.post('/video/like', data)
}
export const deleteLike = (data) => {
    return request.delete('/video/dislike', {data})
}

